Skip to content

Sync dependent state when the workspace or live settings change - #22

Merged
lavindeep merged 3 commits into
mainfrom
fix/workspace-config-atomicity
Jul 10, 2026
Merged

Sync dependent state when the workspace or live settings change#22
lavindeep merged 3 commits into
mainfrom
fix/workspace-config-atomicity

Conversation

@lavindeep

@lavindeep lavindeep commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Memory tools resolve stores through a live getter so /cwd cannot leave model
    tools pointed at the previous project.
  • update_settings refreshes plan profile/max steps, audit profile, and
    skill_read registration in step with the new settings, rather than holding
    boot-time captures.
  • /cwd set re-runs the AGENTS.md trust-on-first-use gate for the new workspace
    before injecting any of its instructions: an already-trusted destination loads
    silently, a new or changed one re-prompts (default No), and a non-TTY session
    fails closed. Either way the previous workspace's project instructions are
    dropped, so a switch into an untrusted repo can neither keep injecting the old
    rules nor silently adopt the new ones. The always-trusted global AGENTS.md is
    reloaded unchanged.
  • Full-screen status bar reads runtime.status().profile instead of the
    boot-time settings binding.

This is dependency coherence — dependents are re-synced when the workspace or
live settings change — not transactional atomicity; there is no rollback across
writes.

Test plan

  • pytest (full suite; adds dispatcher-level coverage for the /cwd
    trust-reload path — non-TTY/decline fail-closed, accept loads + persists the
    digest, already-trusted no re-prompt — and for update_settings toggling
    skill_read registration)
  • ruff check . / ruff format --check . / mypy shellpilot --strict
  • DESIGN.md §10.4 / §16.2.1 / §17.3 / §36.4 updated to match the live behavior

Repository owner deleted a comment from cursor Bot Jul 10, 2026
Memory tools, plan limits, audit/profile metadata, AGENTS.md behavior, and the app status bar now follow /cwd and update_settings instead of retaining boot-time captures.
Exercise SlashDispatcher._reload_behavior_for_workspace: non-TTY and
declined /cwd set fail closed (old project rules dropped, new not loaded,
global preserved), accept loads the new project AGENTS.md and persists its
digest, and an already-trusted destination reloads without prompting. Also
cover update_settings toggling skill_read registration as skills.enabled
gains or loses entries.
…l_read

Correct three drifted claims: max_plan_steps is now read live from
PlanManager (section 10.4), the AGENTS.md trust-on-first-use gate re-runs on
/cwd set for the new workspace (sections 16.2.1 and 36.4), and skill_read
tool registration is refreshed live by update_settings rather than boot-only
(section 17.3).
@lavindeep
lavindeep force-pushed the fix/workspace-config-atomicity branch from f9d2182 to 264506f Compare July 10, 2026 12:26
@lavindeep lavindeep changed the title Keep workspace and live settings changes atomic Sync dependent state when the workspace or live settings change Jul 10, 2026
Repository owner deleted a comment from cursor Bot Jul 10, 2026
@lavindeep
lavindeep merged commit 9309b5a into main Jul 10, 2026
2 checks passed
@lavindeep
lavindeep deleted the fix/workspace-config-atomicity branch July 10, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant